class Index extends GFB.Component {
  constructor(Elm){
    super(Elm)
    this.Init({
      Component:{
        Header,
        Router,
      },
      Service:{
        IndexService
      }
    })
  }

  ServiceObserver(res,function_name,service_name){
    if(function_name == 'router_switch'){
      this.GetSubExample('IndexRouter').Push(res)
    }
  }

  switch_fn(nav){
    this.GetSubExample('IndexRouter').Push(nav)
  }
  
  Render() {
    return `
      <div>
        <Header switch_nav="switch_fn" header_text='一个简约且简单的数据驱动“库”' class="header_component" key="Header" ></Header>
        <Router key="IndexRouter"></Router>
      </div>
    `
  }
}